import request from '../req'
// 推广海报列表
export const queryAdvertiseList = async (params: any) => {
    const res = await request.get('/saas/advertisement/push/count/query-advertise-list', {
        params: params
    })
    return res
}

// 推广折线图
export const queryChart = async (params: any) => {
    const res = await request.get('/saas/advertisement/push/count/query-launch-tendency', {
        params: params
    })
    return res
}


// 销售数据排行
export const querySalesRanking = async (params: any) => {
    const res = await request.get('/saas/advertisement/push/count/query-sales-ranking', {
        params: params
    })
    return res
}

// 推广记录列表
export const promiotionList = async (params: any) => {
    const res = await request.get('/crm/promotion/record/list', {
        params: params
    })
    return res
}

// 推广信息详情
export const promiotionDetail = async (params: any) => {
    const res = await request.get('/crm/promotion/record/detail', {
        params: params
    })
    return res
}

// 推广设置信息业务员,返费金额
export const promotionInfo = async (data: any) => {
    const res = await request.put('/crm/promotion/record/promotion-info', data)
    return res
}

// 导出推广记录列表
export const recordExport = async (params: any) => {
    const res = await request.get('/crm/promotion/record/export', {
        params: params
    })
    return res
}

// 导出推广记录列表
export const exportjapanapplyapi = async (params?: any) => {
    const res = await request.get('/pay/pay-manager-user/export-japan-apply', {
        params: params
    })
    return res
}


// 导出产品申请
export const exportsubscribecustomer = async (params?: any) => {
    const res = await request.get('/saas/note/saasCompany/export-subscribe-customer', {
        params: params
    })
    return res
}

// 导出人力资源游学列表
export const exportHrApplyApi = async (params?: any) => {
    const res = await request.get('/pay/pay-manager-user/export-hr-apply', {
        params: params
    })
    return res
}

// 查询推广海报
export const getPromotionalPosterListApi = async (data: any) => {
    const res = await request.get('/saas/advertisement/push/count/query-poster-list', {
        params: data
    })
    return res
}

// 删除推广海报
export const delPosterApi = async (dictCodes: any) => {
    const res = await request.delete(`/system/dict/data/${dictCodes}`)
    return res
}

// 上传海报
export const uploadPosterApi = async (data: {
    posterName: string
    posterUrl: string
}) => {
    const res = await request.post('/saas/advertisement/push/count/upload-poster', data)
    return res
}